using System;
using System.ComponentModel.DataAnnotations;

namespace ERP.ERPSystem.WarehouseManagement.Dto
{
    /// <summary>
    /// 装箱管理DTO
    /// </summary>
    public class PackingDto
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 装箱单编号
        /// </summary>
        public string PackingCode { get; set; }

        /// <summary>
        /// 装箱日期
        /// </summary>
        public DateTime PackingDate { get; set; }

        /// <summary>
        /// 装箱日期字符串
        /// </summary>
        public string PackingDateString => PackingDate.ToString("yyyy-MM-dd");

        /// <summary>
        /// 销售订单编号
        /// </summary>
        public string SaleOrderCode { get; set; }

        /// <summary>
        /// 发票编号
        /// </summary>
        public string InvoiceCode { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        public string CustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string CustomerName { get; set; }

        /// <summary>
        /// 箱长度
        /// </summary>
        public string PackingLength { get; set; }

        /// <summary>
        /// 箱宽度
        /// </summary>
        public string PackingWidth { get; set; }

        /// <summary>
        /// 箱高度
        /// </summary>
        public string PackingHeight { get; set; }

        /// <summary>
        /// 尺寸单位
        /// </summary>
        public string PackingSize { get; set; }

        /// <summary>
        /// 净重
        /// </summary>
        public string NetWeight { get; set; }

        /// <summary>
        /// 毛重
        /// </summary>
        public string GrossWeight { get; set; }

        /// <summary>
        /// 重量单位
        /// </summary>
        public string UnitWeight { get; set; }

        /// <summary>
        /// 检查员
        /// </summary>
        public string Inspector { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 状态显示
        /// </summary>
        public string StateDisplay
        {
            get
            {
                return State switch
                {
                    0 => "草稿",
                    1 => "已确认",
                    2 => "已完成",
                    3 => "已取消",
                    _ => "未知"
                };
            }
        }
    }
} 